using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Simple.Entity.Models.Mapping
{
    public class Sys_MenuMap : EntityTypeConfiguration<Sys_Menu>
    {
        public Sys_MenuMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.MenuName)
                .HasMaxLength(50);

            this.Property(t => t.Icon)
                .HasMaxLength(50);

            this.Property(t => t.CreateUser)
                .HasMaxLength(50);

            this.Property(t => t.ModifyUser)
                .HasMaxLength(50);

            this.Property(t => t.ControllerName)
                .HasMaxLength(50);

            this.Property(t => t.ActionName)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Sys_Menu");
        }
    }
}
